import React, { useEffect } from "react";
// import { Navigate, useLocation } from "react-router-dom";
// import { useAuth } from "../contexts/AuthContext";

// 修复后的AuthGuard组件，确保返回有效的JSX元素
const AuthGuard = ({ requiresAuth = false, roles = [], children }) => {
  console.log("requiresAuth", requiresAuth);
  console.log("roles", roles);
  console.log("children", children);

  // 确保始终返回有效的React元素
  return <>{children}</>;
};

export default AuthGuard;
